f78bd4
@@ -34,6 +34,8 @@
import org.jboss.as.ee.component.ComponentView;
 import org.jboss.as.ee.component.EEModuleDescription;
 import org.jboss.as.ee.component.ViewDescription;
 import org.jboss.as.ee.component.deployers.StartupCountdown;
+import org.jboss.as.ee.structure.DeploymentType;
+import org.jboss.as.ee.structure.DeploymentTypeMarker;
 import org.jboss.as.ejb3.component.EJBComponent;
 import org.jboss.as.ejb3.component.EJBComponentDescription;
 import org.jboss.as.ejb3.component.EJBViewDescription;
@@ -69,6 +71,10 @@
public class DeploymentRepositoryProcessor implements DeploymentUnitProcessor {
         if (eeModuleDescription == null) {
             return;
         }
+        if(DeploymentTypeMarker.isType(DeploymentType.EAR, deploymentUnit)) {
+            //don't create this for EAR's, as they cannot hold EJB's
+            return;
+        }
         // Note, we do not use the EEModuleDescription.getApplicationName() because that API returns the
         // module name if the top level unit isn't a .ear, which is not what we want. We really want a
         // .ear name as application name (that's the semantic in EJB spec). So use EEModuleDescription.getEarApplicationName
